
import 'package:flutternettest/model/banner_entity.dart';
import 'package:flutternettest/model/login_info_entity.dart';

class EntityFactory {
  static T generateOBJ<T>(json) {
    if (1 == 0) {
      return null;
    } else if (T.toString() == "BannerEntity") {
      return BannerEntity.fromJson(json) as T;
    } else if (T.toString() == "LoginInfoEntity") {
      return LoginInfoEntity.fromJson(json) as T;
    } else {
      return null;
    }
  }
}